package com.smartisee.myrule;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import com.netflix.loadbalancer.RetryRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Auther: sp
 * @Date: 2019/2/20 10:54
 * @Description:
 */

@Configuration
public class MySelfRule {

    @Bean
    public IRule myRule(){
//        return new RandomRule(); //Ribbin默认的是轮询，我自定义为
        return new RandomRule_XY();//自定义的负载均衡
    }
}
